<template>
  <div class="son">
 <p>   {{ msg }}</p>
 <!-- {{message}} -->
 <button @click="ad">测试2</button>
  </div>
</template>
<script>
export default {
  name: "sonS",
  props: {
    msg: String,
    // message:"我来自son2"
  },
  data() {
    return {
      message: "这是第二个子组件",
    };
  },
  methods: {
    ad(){
      this.$emit("tese",this.message)
      // 传向父亲son.vue
    }
  },
};
</script>
<style scoped>
.son{
  border:1px red solid;
}
</style>